\section{pstart --- Create main plot window}
\label{fn:pstart}
\index{pstart()}
\index{plotting!creating window}
\index{creating plot windows}
\index{windows!for plotting}
\begin{rail}
PStart : 'pstart' '(' ( Scalar (',' (Scalar (',' (String )?)?)?)?)? ')' ;
\end{rail}

\verb+pstart+ is used to create a plotting window.  Within each
plotting window there can be sub-plots.  The first argument to
\verb+pstart+ is the number of sub-plots to be created in the
horizontal direction, and the second argument is the number of
sub-plots to be created in the vertical direction. If these arguments
are omitted, they default to $1$.  This means that if both are
omitted, a single sub-plot wil be created within the plotting window.
The third argument is the type of output.  The list of valid output
devices is dependent on the setup of the plotting library for your
particular system, however some typical values include \verb+"xwin"+
--- X Window System, \verb+"xterm"+ --- X terminal, \verb+"plmeta"+ ---
PLPLOT portable meta-file format, \verb+"tekt"+ --- Tektronix terminal,
\verb+"xfig"+ --- Xfig file, \verb+"ps"+ --- Postscript, \verb+"psc"+ ---
Colour Postscript and \verb+"hp7470"+ ---- HPGL plotter.  To obtain a
full list, execute \verb+pstart+ without any arguments.

The newly created plot window will become the current plot window.

$\Longrightarrow$ This is not an \RLaB\ built-in function.  This function
is normally loaded on start-up from the \verb+plot.r+ file in the
standard \verb+rlib+ directory. Use of the \verb+-r+ option, incorrectly 
setting the \verb+RLAB_LIB_DIR+ environmental variable, or modifying
\verb+plot.r+ may make this function unavailable.

\paragraph{Example}
\index{example of pstart()}
\index{pstart()!example}
\begin{verbatim}
> pstart();

Plotting Options:
 < 1> (xwin)     X-Window (Xlib)
 < 2> (xterm)    Xterm Window
 < 3> (tekt)     Tektronix Terminal (4010)
 < 4> (t4107t)   Tektronix Terminal (4105/4107)
 < 5> (mskermit)         MS-Kermit emulator
 < 6> (dg300)    DG300 Terminal
 < 7> (plmeta)   PLPLOT Native Meta-File
 < 8> (tekf)     Tektronix File (4010)
 < 9> (t4107f)   Tektronix File (4105/4107)
 <10> (ps)       PostScript File (monochrome)
 <11> (psc)      PostScript File (color)
 <12> (xfig)     Xfig file
 <13> (ljii)     LaserJet II Bitmap File (150 dpi)
 <14> (hp7470)   HP 7470 Plotter File (HPGL Cartridge, Small Plotter)
 <15> (hp7580)   HP 7580 Plotter File (Large Plotter)
 <16> (imp)      Impress File
 <17> (null)     Null device

Enter device number or keyword: 17
Sending output to Null device..
> pstart(1,2,"hp7470")
Enter desired name for graphics output file: dummy.hpgl
Created dummy.hpgl
 P =
        1
\end{verbatim}

See also: Page~\pageref{fn:pclose} \verb+pclose()+,
Page~\pageref{fn:pend} \verb+pend()+,
Page~\pageref{fn:pwin} \verb+pwin()+.

\newpage






